---
title: "SQL-VP-009: Retrieve coverage gaps for a policy"
summary: Retrieves coverage-gap periods for a policy via the Oracle view-policy package (lazy-loaded property).
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# SQL-VP-009 Retrieve coverage gaps for a policy

Lazily loaded when `clsPolicyData.Gaps` is first accessed; one of eleven ad hoc lazy-loaded SQL
statements hanging off the central `clsPolicyData` aggregate object.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-VP-009 |
| **Operation type** | Read |
| **Execution method** | Stored procedure |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | StoredProcedure |
| **Business object** | `clsPolicyData` |
| **Criteria property** | `Gaps` property (lazy, ad hoc) |
| **Lifecycle method** | ad hoc method |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `aPolicyNum` | Input | Decimal | N/A | Policy number to retrieve coverage gaps for. |
| `recordset` | Output (Cursor) | REF CURSOR | N/A | Result set containing coverage-gap rows. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| *(not directly visible — encapsulated in procedure body)* | SELECT | N/A |

## Sample SQL

```sql
BEGIN
  pk72846_view_policy.getgaps(
    aPolicyNum => :aPolicyNum,
    recordset  => :recordset
  );
END;
```

*Call signature reconstructed from `DataRequest.SQLStatement`/`AddParm`/`AddCursorParm` calls; the
procedure body resides in the Oracle database and was not retrieved this run.*

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsPolicyData.vb`
